package com.woniuxy.reader.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.reader.entity.Book;
import com.woniuxy.reader.entity.Collection;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zh_o
 * @since 2020-10-12
 */
public interface CollectionService extends IService<Collection> {
    /**
     * 根据用户id得到该用户收藏书的集合
     * @param id
     * @return
     * @throws Exception
     */
    public List<Book> getBooks(Integer userId)throws Exception;
    /**
     * 根据用户id和书籍id删除该用户收藏的指定书籍
     */
    public int deleteBook(Integer bid,Integer uid)throws Exception;
}
